package soft863.com.mr3;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class mvMapper extends Mapper<LongWritable, Text,Text,LongWritable> {
    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        String line = value.toString();
        String[] s = line.split(",");
        long people = Long.parseLong(s[s.length - 1].replace("人评价",""));
        context.write(new Text("评价总人数"),new LongWritable(people));
    }
}
